[#include "/WEB-INF/pages/common/taglibs.ftl"]

<form action="[@c.url value="/manage/Category_${act}.action"/]?backurl=${action.backurl}" method="post" class="validate">
	<table cellspacing="0" cellpadding="0" border="0" class="stdtable-form">
		<thead>
			<tr>
				<th class="head0"></th>
				<th class="head1"></th>
				<th class="head0"></th>
				<th class="head1"></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>所属频道：[#--[@fmt.message key="manage.category"/] --]</td>
				<td>
					<select name="category.channelId" class="" [#if act=='update']disabled="disabled"[/#if]>
						[#list channelList as c]
							<option value="${c.id}" [#if (category != null && category.channelId == c.id) || (channelId == c.id)]selected='selected'[/#if] >${c.title}</option>
						[/#list]
					</select>
				</td>
				<td colspan=2></td>
				[#--
				<td>类型：</td>
				<td><input type="text" class="atomicinput" placeholder="?" name="category.type" value="${(category.type)!''}" /></td>
				--]
			</tr>
			<tr>
				<td>上级栏目：[#--[@fmt.message key="manage.category"/] --]</td>
				<td>
					<select name="category.pid" class="" [#if act=='update']disabled="disabled"[/#if]>
						<option value=""></option>
						[#list categoryList as c]
							<option value="${c.id}" [#if category != null && pid == c.id]selected='selected'[/#if] >${c.name}</option>
						[/#list]
					</select>
				</td>
				<td colspan=2></td>
			</tr>
			<tr>
				<td>名称：<small>key</small></td>
				<td>
					<input type="text" class="smallinput" name="category.name" value="${(category.name)!''}" rel="${action.getValidateMetadata("/manage", "Category_${act}", "category.name")}"/>
				</td>
				[#--<td>关键字：</td>
				<td><input type="text" placeholder="?" class="smallinput" name="category.keyWords" value="${(category.keyWords)!''}"/></td>
				--]
				<td colspan=2></td>
			</tr>
			<tr>
				<td>路径： <small>* 将生成URL地址</small></td>
				<td><input type="text" class="smallinput" name="category.path" value="${(category.path)!''}" rel="${action.getValidateMetadata("/manage", "Category_${act}", "category.path")}"/></td>
				<td colspan=2></td>
			</tr>	
			<tr>
				<td>标题：[#--[@fmt.message key="manage.article.type"/]--]</td>
				<td colspan=3>
					<input type="text" class="mediuminput" placeholder="?" name="category.title" value="${(category.title)!''}" rel="${action.getValidateMetadata("/manage", "Category_${act}", "category.title")}"/>
				</td>
			</tr>
			<tr>
				<td>模板</td>
				<td colspan="3">
					<select name="category.templateId">
						<!--<option value=""></option>-->
						[#list templateList as template]
							<option value="${template.id}" [#if (category.templateId) ?? && template.id ==category.templateId]selected="selected"[/#if]>${template.name}</option>
						[/#list]
					</select>&nbsp;<a href="javascript:;" class="anchorbutton button_editor template_edit"><span>编辑</span></a>
				</td>
			</tr>
			<tr>
				<td>发布：</td>
				<td><select name="category.draft">
						<option value="true" [#if category == null || category.draft == true]selected="selected"[/#if] >草稿</option>
						<option value="false" [#if (category != null && category.draft == false)]selected="selected"[/#if] >正式</option>
					</select>
				</td>
				<td colspan=2>
					<label for="cpermission">&nbsp;&nbsp;访问权限 </label><input rel="{labelOn: '授权 ', labelOff: '公开 ', easing: 'easeOutBounce', duration: 800}" class="yes_no" type="checkbox" style="height:33px;" id="cpermission" name="category.permission" value="true" [#if category == null || (category.permission ==true)]checked[/#if]/>
					[#--<label for="cpermission1">&nbsp;&nbsp;公开</label><input type="radio" style="height:33px;" id="cpermission1" name="category.permission" value="false" [#if (category != null && category.permission == false)]checked[/#if]/>
					<label for="cpermission2">&nbsp;&nbsp;需要访问许可</label><input type="radio" style="height:33px;" id="cpermission2" name="category.permission" value="true" [#if category == null || (category.permission ==true)]checked[/#if]/> --]
				</td>
			</tr>
			<tr>
				[#--<td>状态：</td>
				<td>
					<input type="text" class="smallinput" name="category.status" value="${(category.status)!''}"/>
				</td>--]
				<td>语言：</td>
				<td>
					<select name="category.i18n">
						[#list configI18N.configItemList as item]
							<option value="${item.value}" [#if (category.i18n)?? && item.value==category.i18n]selected="selected"[/#if]>${item.name}</option>
						[/#list]
					</select>
				</td>
				<td colspan=2>
					<label for="cenabled">&nbsp;&nbsp;可用状态</label><input rel="{labelOn: '可用', labelOff: '禁用', easing: 'easeOutBounce', duration: 800}" class="yes_no" type="checkbox" id="cendbled" name="category.enabled" value="true" [#if category == null || (category.enabled ==true)]checked[/#if]/>
					[#--<label for="cendbled1">&nbsp;&nbsp;可用</label><input type="radio" id="cendbled1" name="category.enabled" value="true" [#if category == null || (category.enabled ==true)]checked[/#if]/>
					<label for="cendbled2">&nbsp;&nbsp;禁用</label><input type="radio" id="cendbled2" name="category.enabled" value="false" [#if (category != null && category.enabled == false)]checked[/#if]/>--]
				</td>
			</tr>
			<tr>
				<td>描述</td>
				<td colspan="3"><textarea  maxlength="255" name="category.description" class="longinput">${(category.description)!''}</textarea></td>
			</tr>
			<tr>
				<td></td>
				<td colspan=3>
					<input type="hidden" name="category.id" value="${(category.id)!''}" />
					<input type="hidden" name="id" value="${(category.id)!''}" />
					<button class="submit ">提&nbsp;&nbsp;交</button>
					<input type="reset" value="重&nbsp;&nbsp;置" class="reset radius2" />
					<input type="button" id="templateReview" value="预&nbsp;&nbsp;览" class="reset radius2" />
					<a class="anchorbutton button_alert" href="${action.backurl}" style="margin-left:6px;background-color: rgb(247, 247, 247); border-color: rgb(204, 204, 204); color: rgb(51, 51, 51);">
						<span style="line-height: 21px;background-color: rgb(255, 255, 255); border-color: rgb(221, 221, 221);">返&nbsp;&nbsp;回</span></a>
				<!--&nbsp;<a class="anchorbutton button_alert growl category_review" id="templateReview" href="" style="background-color: rgb(247, 247, 247); border-color: rgb(204, 204, 204); color: rgb(51, 51, 51);">
					 	<span style="line-height: 21px; background-color: rgb(255, 255, 255); border-color: rgb(221, 221, 221);">预&nbsp;&nbsp;览</span>
					 </a>-->
				</td>
			</tr>
	    </tbody>
	</table>
</form>